import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// Baseuse 基本使用
const ClassDemo = () => import('@/components/BaseUse/ClassDemo.vue')
const ListDemo = () => import('@/components/BaseUse/ListDemo.vue')
const ComputedDemo = () => import('@/components/BaseUse/ComputedDemo.vue')
const WatchDemo = () => import('@/components/BaseUse/WatchDemo.vue')
const EventDemo = () => import('@/components/BaseUse/EventDemo.vue')
const FormDemo = () => import('@/components/BaseUse/FormDemo.vue')
const ConditionDemo = () => import('@/components/BaseUse/ConditionDemo.vue')
const Todo = () => import('@/components/BaseUse/Todo.vue')
const TplDemo = () => import('@/components/BaseUse/TplDemo.vue')

// ComponentsDemo
const ComponentsDemo = () => import('@/components/ComponentsDemo')

const propDemo = () => import('@/components/propDemo/parent')

// 高级特性
const AdvancedUse = () => import('@/components/AdvancedUse')

// vue原理
const Cart = () => import('../components/Cart')

const routes1 = [
  {
    path: '/classDemo',
    name: 'classDemo',
    component: ClassDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },
  {
    path: '/ListDemo',
    name: 'ListDemo',
    component: ListDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },
  {
    path: '/ComputedDemo',
    name: 'ComputedDemo',
    component: ComputedDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/WatchDemo',
    name: 'WatchDemo',
    component: WatchDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/EventDemo',
    name: 'EventDemo',
    component: EventDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/FormDemo',
    name: 'FormDemo',
    component: FormDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/ConditionDemo',
    name: 'ConditionDemo',
    component: ConditionDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/Todo',
    name: 'Todo',
    component: Todo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },{
    path: '/TplDemo',
    name: 'TplDemo',
    component: TplDemo,
    meta: {
      group: {
        id: 'Baseuse',
        name: '基本使用'
      }
    }
  },
  {
    path: '/ComponentsDemo',
    name: 'ComponentsDemo',
    component: ComponentsDemo,
    meta: {
      group: {
        id: 'ComponentsDemo',
        name: '组件使用'
      }
    }
  },
  {
    path: '/propDemo',
    name: 'propDemo',
    component: propDemo,
    meta: {
      group: {
        id: 'ComponentsDemo',
        name: '组件使用'
      }
    }
  },
  {
    path: '/provideDemo',
    name: 'provideDemo',
    component: () => import('@/components/provideDemo/parent.vue'),
    meta: {
      group: {
        id: 'ComponentsDemo',
        name: '组件使用'
      }
    }
  },
  {
    path: '/AdvancedUse',
    name: 'AdvancedUse',
    component: AdvancedUse,
    meta: {
      group: {
        id: 'AdvancedUse',
        name: '高级特性'
      }
    }
  },
  {
    path: '/Cart',
    name: 'Cart',
    component: Cart,
    meta: {
      group: {
        id: 'AdvancedUse',
        name: '高级特性'
      }
    }
  }
]


const routes = [...routes1];

export default new Router({
  routes
})